<template>
	<view class="top">
		<view class="c-cell-title" v-if="showTitle" :style="style">
			{{title}}
		</view>
		<view class="c-cell-group">
			<slot />
		</view>
	</view>
</template>

<script>
	export default{
		props:{
			title:{
				type:String
			},
			style:{
				type:String,
				default:"font-size:30rpx;color:rgba(69, 90, 100, 0.6);"
			}
		},
		data(){
			return{
				showTitle:true
			}
		},
		created() {
			this.init()
		},
		methods:{
			init:function(){
				if(this.title == ""){
					this.showTitle = false
				}
			}
		}
	}
</script>

<style scoped>
	.top{
		display: flex;
		flex-direction: column;
	}
	.c-cell-title{
		padding: 30rpx 0 30rpx 30rpx;
	}
	.c-cell-group{
		width: calc(100% - 60rpx);
		padding: 0 30rpx;
		background: #FFFFFF;
		display: flex;
		flex-direction: column;
	}
</style>
